#ifndef INDEX_H
#define INDEX_H

#include "Node.h"

class Index : public Node // Index operator node
{
	public:
		Index(Node * Identifier, Node * Offset, bool Is_left = false): identifier(Identifier), offset(Offset), is_left(Is_left) {}
		~Index() { delete(identifier); delete(offset); }
		Node * getIdentifier() const;
		Node * getOffset() const;
		void accept(Visitor & v);
		bool isLeft();
	private:
		Node * identifier;
		Node * offset;
		bool is_left;
};

#endif

